package day1;

public class movieOperator {
private movie film[]=new movie[6];
 private static movieOperator m1=new movieOperator();
private movieOperator(){}
//   private movieOperator(movie[] films) {
//
//        this.film = films;
////        System.out.println(i+"asid");
//    }

  /* public movieOperator(movie[] film) {
            this.film = film;
            System.out.println(i+"asid");
        }*/


    public  static movieOperator getM1() {
        return m1;
    }
    public  void research(String id,movie[]film)
    {   this.film=film;
        boolean flag=true;
        for(int i=0;i< film.length;i++)
        {
            if(id.equals(film[i].getId()))
            {   flag=false;
                System.out.print(film[i].getName());
                System.out.println(" "+film[i].getPrice());
            }
        }
        if(flag==true) System.out.println("没找到");
        return;
    }
}

